<h3><?php echo $this->title?></h3>
<div class="upload-image">
<form action="/admin/position/list?album=2" method="get">
    <h4>Tìm kiếm Album</h4>
    <table class="table table-condensed">
        <tr>
            <td><label for="id">Id:</label></td>
            <td><input type="text" id="id" name="id" value="<?php echo $this->params['id'];?>" /></td>
            <td><label for="position_name">Tên:</label></td>
            <td><input id="position_name" name="position_name" value="<?php echo $this->params['position_name'];?>" /></td>
        </tr>
    </table>
    <div class="control-group">
        <div class="controls">
          <button type="submit" class="btn">Tìm</button>
        </div>
  </div>
</form>
<div style="color:red;"><?php echo $this->errMessage;?></div>
<a href="/admin/position/edit?album=2" style="font-weight: bold">Tạo mới</a>
<?php if(is_array($this->positions)) {?>
    <table class="table table-bordered table-striped">
        <thead>
              <tr>
                <th>Tên Album</th>
                <th>Ảnh đại diện</th>
                <th>Ngày cập nhật</th>
                <th>Ngày tạo</th>
                <th>Hình ảnh</th>
                <th>Thao tác</th>
              </tr>
        </thead>
        <tbody>
            <?php foreach($this->positions as $position) :?>
             <tr>
                 <td><?php echo $position['position_name']?></td>
                 <td>
                     <a class="fancy" href="<?php echo Utils_Global::get('staticUrl') . '/banner/' . $position['image']?>" alt="<?php echo $position['image']?>">
                         <img src="<?php echo Utils_Global::get('staticUrl') . '/banner/' . $position['image']?>" alt="<?php echo $position['image']?>" width="50" height="50">
                     </a>
                 </td>
                 <td><?php echo date('d/m/Y H:i:s', $position['last_update'])?></td>
                 <td><?php echo date('d/m/Y H:i:s', $position['dateline'])?></td>
                 <td>
                     <a href="/admin/banner/list/position/<?php echo $position['id']?>?album=2" >View</a>
                 </td>
                 <td>
                     <a href="/admin/position/edit/id/<?php echo $position['id']?>?album=2">
                         <i class="icon-edit"></i>
                     </a>
                     <a href="/admin/position/delete/id/<?php echo $position['id']?>?album=2" onclick="return confirm('sure?');">
                         <i class="icon-remove"></i>
                     </a>
                 </td>
             </tr>
             <?php endforeach;?>
        </tbody>
      </table>
      <?php echo $this->paginationcontrol2($this->page, $this->totalItem, $this->numRowPerPage, 'pagination.phtml', $this->currentUrl);?>
</div>
<?php } else {?>
<div>Không có dữ liệu!</div>
<?php }?>
